﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KHOALUAN
{
    public partial class frmChucDanh : Form
    {
        public frmChucDanh()
        {
            InitializeComponent();
            clsMain.cls.KhoiTaoXMLTable(clsMain.FormChucDanh, 3);
            clsMain.cls.clsForm.xmlD[clsMain.FormChucDanh].ColumnName[0] = "MÃ SỐ";
            clsMain.cls.clsForm.xmlD[clsMain.FormChucDanh].ColumnName[1] = "TÊN CHỨC DANH";
            clsMain.cls.clsForm.xmlD[clsMain.FormChucDanh].ColumnName[2] = "GHI CHÚ";
            clsMain.cls.clsForm.xmlD[clsMain.FormChucDanh].Names[0] = "MSCD";
            clsMain.cls.clsForm.xmlD[clsMain.FormChucDanh].Names[1] = "TENCD";
            clsMain.cls.clsForm.xmlD[clsMain.FormChucDanh].Names[2] = "GHICHU";
        }

        private void frmChucDanh_Load(object sender, EventArgs e)
        {
            
            clsMain.cls.KhoiTaoFormControls(clsMain.FormChucDanh);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormChucDanh, dgv);
            clsMain.cls.KhoiTaoFormControls(clsMain.FormChucDanh, but);
        }

        private void dgv_MouseDoubleClick(object sender, EventArgs e)
        {
            clsMain.cls.AddDataToControls(clsMain.FormChucDanh);
        }

        private void but_Click(object sender, EventArgs e)
        {
            clsMain.cls.ButtonsClick(clsMain.FormChucDanh, but.ClickState);
        }
    }
}
